Skip to content

fix: pipeline import with identically-named nested dirs (fixes #74)#91

Open
Abdeltoto wants to merge 1 commit intoREGOVAR:masterfrom
Abdeltoto:fix-pipeline-import-nested-dirs
Open

fix: pipeline import with identically-named nested dirs (fixes #74)#91
Abdeltoto wants to merge 1 commit intoREGOVAR:masterfrom
Abdeltoto:fix-pipeline-import-nested-dirs

Conversation

@Abdeltoto
Copy link
Copy Markdown

Closes #74

When a zip archive contains nested directories with the same name (e.g.
ame/name/), \shutil.move\ moves the inner directory into the outer one instead of to root, leaving \os.rmdir\ to fail on a non-empty directory.

Fix: Rename the top directory to a UUID before moving files, as suggested by @Arkanosis in the issue comments.

Also fixes typo FAILLED -> FAILED in manifest validation error messages.

Made with Cursor

…R#74)

When a zip contains name/name/, shutil.move would move the inner dir
into the outer one instead of to root, leaving rmdir to fail. Rename
the top dir to a UUID first to avoid the conflict.

Also fix typo FAILLED -> FAILED in manifest validation errors.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipeline import broken by identically-named nested directories

1 participant